<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>内置对象</title>
</head>
<body>
    <script>

        let str = "hello javascript";
        console.log(str.length);
        console.log(str.indexOf("java"));
        console.log(str.substring(6,10));

        console.log(random(10,20));

        function random(start,end){
            return parseInt(Math.random() * (end - start + 1) + start)
        }

        let date = new Date();
        console.log(date)

        let str1 = "hello";
        let str2 = new String("hello");
        console.log(typeof str1,typeof str2);

        let str3 = "asdfbsdkfsdf1234sadfasdf";
        console.log(/^\w{6,20}$/.test(str3));

        console.log(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test("abcsina.com"));
    </script>
</body>
</html>